package com.example.demo;

import com.example.demo.bean.JavastackProperties;
import com.example.demo.config.TestConfiguration;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@Slf4j
public class DemoApplication {

	@Autowired
	private JavastackProperties javastackProperties;

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

	@Bean
	public CommandLineRunner commandLineRunner1() {
		log.info("------------------commandLineRunner1");
		return (args -> {
			log.info(javastackProperties.toString());
		});
	}
}
